package cn.fresh.xuanyuan.module.trade.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Data
@Schema(description = "用户 App - 下单请求基本参数")
public class AddOrderDto {

    @Schema(description = "收货地址ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long addressId;

    private String remark;

    @Schema(description = "下单类目", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "下单商品不能为空")
    @Size(min = 1, max = 30, message = "一次下单最多购买30件不同商品")
    private List<AddOrderItemDto> itemList;
}
